<?php
require_once('partials/getGuardList.php');
require_once("../lib/dompdf/dompdf_config.inc.php");

$html =
  '<html><body>'.
  '<p>Put your html here, or generate it with your favourite '.
  'templating system.</p>'.
  '</body></html>';

$dompdf = new DOMPDF();


$css = '
<style>.table-striped tbody > tr:nth-child(2n+1) > td, .table-striped tbody > tr:nth-child(2n+1) > th {
    background-color: rgba(238,255,179, 0.5);
}
.table th, .table td {
    border-top: 1px solid rgba(136, 176, 3, 0.1);
}
table input, table input[type="text"] {
    margin: 0;
}</style>';


$html = '<html><head>';
$html .= '<link rel="stylesheet" type="text/css" href="../static/css/pdf.css">';
$html .= '</head>';
$html .= '<body>';

ob_start();
require_once('partials/guardList.php');
$list = ob_get_clean();

$html .= $list;
$html .= '</body>';
$html .= '</html>';

//die($html);

$dompdf->load_html(utf8_decode($html));
$dompdf->render();
$dompdf->stream("sample.pdf");

